package com.qixiucoding.strategy;

import com.alibaba.fastjson.JSONArray;
import lombok.extern.slf4j.Slf4j;

/**
 * @Description TODO
 * @Author longhj
 * @Date 2022/05/28 星期六 14:10
 */
@Slf4j
public abstract class HandlingDataAbstract<T> {
    public T operating(T start) {
        T t = dealBefore(start);
        t = doDeal(t);
        t = dealAfter(t);
        return t;
    }
    protected T dealBefore(T t) {
        log.info("处理数据前执行操作开始。。。");
        log.info("处理数据前执行操作结束。。。");
        return t;
    }

    protected abstract T doDeal(T t);

    private T dealAfter(T t) {
        log.info("处理数据后执行操作开始。。。");
        log.info("处理数据后执行操作结束。。。");
        return t;
    }




}
